package com.exampl.common;

// 用于创建ThreadLocal对象的工具类
public class BaseContext {
    public static ThreadLocal<Long> threadLocal = new ThreadLocal<Long>();

    // 存储数据
    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }

    // 获取数据
    public static Long getCurrentId(){
        return threadLocal.get();
    }
}
